<!DOCTYPE html>
<html>

<head>
  <meta charset=utf-8>
  <meta name="viewport" content="initial-scale=1.0,maximum-scale=1,user-scalable=no" />
  <meta name="format-detection" content="telephone=no" />
  <title>起始页面</title>
</head>

<body></body>
<script>
  apiready = function () {
    api.openFrame({
      name: 'app',
      url: './index.html',
      // url:'http://192.168.51.44:8080/index.html',
      rect: { x: 0, y: 0, w: api.winWidth, h: api.winHeight },
      pageParam: {},
      bounces: false,
      // bgColor: '#F7F8FA',
      bgColor: 'rgba(0,0,0,0.7)',
      scrollEnabled: false,
      vScrollBarEnabled: false,
      hScrollBarEnabled: false
    })
    api.addEventListener({ name: 'keyback' }, function (ret, err) {
      var frameName = api.frames()
      if (frameName && frameName.length) {
        api.execScript({ frameName: frameName[frameName.length - 1].name, script: 'page.backLastPage&&page.backLastPage()' })
        api.execScript({ frameName: frameName[frameName.length - 1].name, script: 'MiniProgram&&MiniProgram.backLastPage&&MiniProgram.backLastPage()' })
      }
    })
  }
</script>

</html>





<!-- <!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="initial-scale=1.0, maximum-scale=1, user-scalable=no" />
  <meta name="format-detection" content="telphone=no, email=no" />
  <script>
    apiready = function () {
      api.openFrame({
        name: 'app',
        url: './index.html',
        rect: {
          x: 0,
          y: 0,
          w: api.winWidth,
          h: api.winHeight
        },
        pageParam: {},
        bounces: false,
        bgColor: '#fff',
        vScrollBarEnabled: false,
        hScrollBarEnabled: false
      })
      api.addEventListener({
        name: 'keyback'
      }, function (ret, err) {
        var frameName = api.frames();
        if (frameName && frameName.length) {
          console.log(frameName[frameName.length - 1].name)
          api.execScript({
            frameName: frameName[frameName.length - 1].name,
            script: "page.backLastPage&&page.backLastPage()"
          })
          api.execScript({ frameName: frameName[frameName.length - 1].name, script: 'MiniProgram&&MiniProgram.backLastPage&&MiniProgram.backLastPage()' })
        }
      })
    }
  </script>
  <title></title>
</head>
<body>
  <div id="app"></div>
</body>
</html> -->
